/** FASSIT (Forms of Selective Attention in Intelligent Transportation Systems)
 * Computational Creativity and Digital Media
 * Cognitive and Media Systems Group
 * Centre for Informatics and Systems of the University of Coimbra (CISUC)
 *
 * Copyright (c) 2010-2013 University of Coimbra, Portugal
 * All rights reserved.
 */

package agent.Knowledge;


import poi.Uncertainty.Uncertainty;
import agent.Context.Context;
import agent.DBManager.AgentDBManager;
import agent.Metrics.Uncertainty.PastUncertaintyValues;

/**
 * This class has the high level methods, allowing the agent to retrieve the
 * agent's past knowledge about Uncertainty.
 * 
 * @author Hernani Costa
 * @version 0.1 date: 28/01/2013
 */

public class AgentPastKnowledgeAboutUncertainty {
	private PastUncertaintyValues agentPastUncertaintyValues;
	private AgentDBManager agentDBManager;
	private Uncertainty uncertainty;

	/**
	 * ------------------------------------------------------------------------
	 * Constructor class
	 * ------------------------------------------------------------------------
	 * 
	 * @param context
	 *            - the current Agent's Context
	 */
	public AgentPastKnowledgeAboutUncertainty(Context context) {
		agentDBManager = new AgentDBManager();
		agentPastUncertaintyValues = agentDBManager
				.getUncertaintyValuesForGoal(context);
		
		uncertainty = new Uncertainty();
		uncertainty.setUncertaintyDayOff(agentPastUncertaintyValues.getUncertaintyDayOff());
		uncertainty.setUncertaintyPrice(agentPastUncertaintyValues.getUncertaintyPrice());
		uncertainty.setUncertaintySchedule(agentPastUncertaintyValues.getUncertaintySchedule());
	}
	
	public AgentPastKnowledgeAboutUncertainty(String email, String goal) {
		agentDBManager = new AgentDBManager();
		agentPastUncertaintyValues = agentDBManager
				.getUncertaintyValuesForGoal(email, goal);
		
		uncertainty = new Uncertainty();
		uncertainty.setUncertaintyDayOff(agentPastUncertaintyValues.getUncertaintyDayOff());
		uncertainty.setUncertaintyPrice(agentPastUncertaintyValues.getUncertaintyPrice());
		uncertainty.setUncertaintySchedule(agentPastUncertaintyValues.getUncertaintySchedule());
	}

	// ------------------------------------------------------------------------
	// ------------------------GETs and SETs-----------------------------------
	// ------------------------------------------------------------------------

	public Uncertainty getAgentPastKnowledgeAboutUncertainty(){
		return uncertainty;
	}
	
	

}
